﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ViewNewsAdd.aspx.cs" Inherits="Think.Lenovo.Com.Views.News.ViewNewsAdd" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <!-- stylesheets -->
    <link href="/Contents/css/skin.css" rel="stylesheet" type="text/css" />
    <script src="/Contents/resources/scripts/jquery-ui-1.8.custom.min.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="/Contents/resources/css/reset.css" />
    <link rel="stylesheet" type="text/css" href="/Contents/resources/css/style.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="/Contents/resources/css/style_fixed.css" />
    <link id="Link1" rel="stylesheet" type="text/css" href="/Contents/resources/css/colors/blue.css" />
    <meta http-equiv="Cache-Control" content="no" />
    <link rel="stylesheet" type="text/css" href="/Contents/resources/css/reset.css" />
    <link rel="stylesheet" type="text/css" href="/Contents/resources/css/style.css" media="screen" />
    <link id="color" rel="stylesheet" type="text/css" href="/Contents/resources/css/colors/blue.css" />
    <script type="text/javascript" src="/Scripts/lib/jquery-1.4.4.min.js"></script>
    <script type="text/javascript" src="/Scripts/lib/SerializeObject.js"></script>
    <script type="text/javascript">
        function selectAll(obj) {
            var roles = jQuery("input[id^='cbl_right_']").attr('checked', true);
            //jQuery(obj).attr("onclick", "cancelSelect();");
            jQuery("#cancelSelect").show();
            jQuery("#selectAll").hide();
        }
        function cancelSelect(obj) {
            var roles = jQuery("input[id^='cbl_right_']").attr('checked', false);
            jQuery("#selectAll").show();
            jQuery("#cancelSelect").hide();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="content" style="background: url(/Contents/resources/images/background.png);">
        <!-- content / right -->
        <div id="right">
            <div class="box">
                <!-- box / title -->
                <div class="title">
                    <h5>
                        发布文章</h5>
                </div>
                <!-- end box / title -->
                <div class="form">
                    <div class="fields">
                        <div class="field  field-first">
                            <div class="label">
                                <label for="input-small">
                                    文章标题:</label>
                            </div>
                            <div class="input input-file">
                                <asp:TextBox ID="txt_title" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txt_title"
                                    ErrorMessage="文章标题不能为空"></asp:RequiredFieldValidator>
                            </div>
                        </div>
                        <div class="field">
                            <div class="label">
                                <label for="input-medium">
                                    缩略标题:</label>
                            </div>
                            <div class="input">
                                <asp:TextBox ID="txt_abbTitle" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <div class="field">
                            <div class="label">
                                <label for="input-large">
                                    文章属性:</label>
                            </div>
                            <div class="select">
                                <asp:CheckBox ID="cb_tuijian" runat="server" Text="推荐" /><asp:CheckBox ID="cb_tiaozhuan"
                                    runat="server" Text="跳转" /><asp:CheckBox ID="cb_jiacu" runat="server" Text="加粗" /><asp:CheckBox
                                        ID="cb_toutiao" runat="server" Text="头条" />
                            </div>
                        </div>
                        <div class="field">
                            <div class="label">
                                <label for="input-large">
                                    所属栏目:</label>
                            </div>
                            <div>
                                <asp:DropDownList ID="DDL_LanMu" runat="server">
                                    <asp:ListItem Value="1">总部资讯</asp:ListItem>
                                    <asp:ListItem Value="2">分区资讯</asp:ListItem>
                                    <asp:ListItem Value="3">市场活动</asp:ListItem>
                                     <asp:ListItem Value="4">奖励政策</asp:ListItem>
                                     <asp:ListItem Value="5">会员手册</asp:ListItem>
                                     <asp:ListItem Value="6">成功案例</asp:ListItem>
                                     <asp:ListItem Value="7">常见问题</asp:ListItem>
                                     <asp:ListItem Value="8">招募成功案例</asp:ListItem>
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="field">
                            <div class="label">
                                <label for="file">
                                    文章来源:</label>
                            </div>
                            <div class="input input-file">
                                <asp:TextBox ID="txt_source" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <div class="field">
                            <div class="label">
                                <label for="file">
                                    文章作者:</label>
                            </div>
                            <div class="input input-file">
                                <asp:TextBox ID="txt_author" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <div class="field">
                            <div class="label">
                                <label for="file">
                                    文章标签:</label>
                            </div>
                            <div class="input input-file">
                                <asp:TextBox ID="txt_target" runat="server"></asp:TextBox>（请用空格隔开，单个标签长度小于6个字符）
                            </div>
                        </div>
                        <div class="field">
                            <div class="label">
                                <label for="file">
                                    文章排序:</label>
                            </div>
                            <div class="input input-file">
                                <asp:TextBox ID="txt_Taxis" runat="server"></asp:TextBox><asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txt_Taxis"
                                Display="Dynamic" ErrorMessage="只能输入数字" ValidationExpression="^[0-9]*$"></asp:RegularExpressionValidator>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txt_Taxis"
                                ErrorMessage="排序不能为空"></asp:RequiredFieldValidator>
                            </div>
                            
                        </div>
                        <div class="field">
                            <div class="label">
                                <label for="file">
                                    缩略图:</label>
                            </div>
                            <div class="input input-file">
                                <asp:Label ID="lbl_img" runat="server" Text="Label" Visible="false"></asp:Label>
                                <asp:FileUpload ID="FileUpload1" runat="server" />
                            </div>
                        </div>
                        <div class="field">
                            <div class="label">
                                <label for="file">
                                    关键词:</label>
                            </div>
                            <div class="input input-file">
                                <asp:TextBox ID="txt_keyword" runat="server"></asp:TextBox>（请用空格隔开，单个关键词长度小于6个字符）
                            </div>
                        </div>
                        <div class="field">
                            <div class="label">
                                <label for="file">
                                    摘要:</label>
                            </div>
                            <div class="input input-file">
                                <asp:TextBox ID="txt_Abstracts" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <div class="field">
                            <div class="label">
                                <label for="file">
                                    正文内容:</label>
                            </div>
                            <div>
                                <FCKeditorV2:FCKeditor ID="editor" runat="server" Width="100%" Height="350" BasePath="~/editors/fckeditor/"
                                    ToolbarSet="Custom" ToolbarStartExpanded="true">
                                </FCKeditorV2:FCKeditor>
                            </div>
                        </div>
                        <div class="field">
                            <div class="label">
                                <label for="file">
                                    反馈选项:</label>
                            </div>
                            <div class="select">
                                <asp:RadioButtonList ID="fankui" runat="server" RepeatDirection="Horizontal">
                                    <asp:ListItem Value="1" Selected=True>允许反馈</asp:ListItem>
                                    <asp:ListItem Value="0">关闭反馈</asp:ListItem>
                                </asp:RadioButtonList>
                            </div>
                        </div>
                        <div class="field">
                            <div class="label">
                                <label for="file">
                                    签到选项:</label>
                            </div>
                            <div class="select">
                                <asp:RadioButtonList ID="sign" runat="server" RepeatDirection="Horizontal">
                                    <asp:ListItem Value="1" Selected ="True">开启</asp:ListItem>
                                    <asp:ListItem Value="0">关闭</asp:ListItem>
                                </asp:RadioButtonList>
                            </div>
                        </div>
                        <div class="field">
                            <div class="label">
                                <label for="input-large">
                                    浏览权限:
                                </label>
                            </div>
                            <div class="select">
                            <span id="selectAll"><input type="button" onclick="selectAll(this);" value="全选"/></span>
                                    <span id="cancelSelect" style="display:none"><input type="button" onclick="cancelSelect(this);" value="取消"/></span>
                                <asp:CheckBoxList ID="cbl_right" runat="server" DataTextField="name" DataValueField="Id"
                                    RepeatDirection="Horizontal" RepeatColumns="3">
                                </asp:CheckBoxList>
                            </div>
                        </div>
                        <div class="field">
                            <div class="label">
                                <label for="file">
                                    消耗积分:</label>
                            </div>
                            <div class="input input-file">
                                <asp:TextBox ID="txt_Integral" runat="server"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txt_Integral"
                                    ErrorMessage="只能输入数字" ValidationExpression="^[0-9]*$" Display="Dynamic"></asp:RegularExpressionValidator>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txt_Integral"
                                    ErrorMessage="消耗积分不能为空" Display="Dynamic"></asp:RequiredFieldValidator>
                            </div>
                        </div>
                        <div class="buttons">
                            <asp:Button ID="btn_add" runat="server" Text="添加" OnClick="btn_add_Click" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    </form>
</body>
</html>
